﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace iTeamyou.LTS.Core.Models
{
	/// <summary>
	/// 商品
	/// </summary>
	public class Product
	{
        /// <summary>
        /// SKU编号
        /// </summary>
        [DisplayName("SKU")]
        [Description("SKU")]
        public string? PId { get; set; }

        /// <summary>
        /// UPC编号
        /// </summary>
        [DisplayName("UPC")]
        [Description("UPC")]
        [Required(ErrorMessage = "UPC不能为空")]
        public string UPC { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        [DisplayName("商品名称")]
        [Description("商品名称")]
        [Required(ErrorMessage = "商品名称不能为空")]
        public string Name { get; set; }

        /// <summary>
        /// 商品规格
        /// </summary>
        [DisplayName("商品规格")]
        [Description("商品规格")]
        public string? Specification { get; set; }

        /// <summary>
        /// 商品品牌
        /// </summary>
        [DisplayName("商品品牌")]
        [Description("商品品牌")]
        public string? Brand { get; set; }

        /// <summary>
        /// 商品部类
        /// </summary>
        [DisplayName("商品部类")]
        [Description("商品部类")]
        public string? Department { get; set; }

        /// <summary>
        /// 商品分类
        /// </summary>
        [DisplayName("商品分类")]
        [Description("商品分类")]
        public string? Category { get; set; }

        /// <summary>
        /// 商品细分类
        /// </summary>
        public string? SectionId { get; set; }

        /// <summary>
        /// 产地
        /// </summary>
        [DisplayName("产地")]
        [Description("产地")]
        public string? OriginPlace { get; set; }

        /// <summary>
        /// 供应商编码
        /// </summary>
        public string? SupplierId { get; set; }

        ///// <summary>
        ///// 供应商关联编码
        ///// </summary>
        //public string? SupplierRefId { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [DisplayName("创建时间")]
        [Description("创建时间")]
        public DateTime? CreatedOn { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        [DisplayName("创建者")]
        [Description("创建者")]
        public string CreatedBy { get; set; }

        /// <summary>
        /// 最近更新时间
        /// </summary>
        [DisplayName("最近更新时间")]
        [Description("最近更新时间")]
        public DateTime? LastModifiedOn { get; set; }

        /// <summary>
        /// 最近更新者
        /// </summary>
        [DisplayName("最近更新者")]
        [Description("最近更新者")]
        public string LastModifiedBy { get; set; }

        /// <summary>
        /// 商品证照
        /// </summary>
        [DisplayName("商品证照")]
        [Description("商品证照")]
        [Required]
        public List<ProductLicense> ProductLicenses { get; set; }

        /// <summary>
        /// 证照数
        /// </summary>
        [DisplayName("证照数")]
        [Description("证照数")]
        public int LicenseNum { get; set; }

        /// <summary>
        /// 系统唯一编号
        /// </summary>
        public string Id { get; set; }
    }

    /// <summary>
	/// 商品导出
	/// </summary>
	public class ExportProduct
    {
        /// <summary>
        /// SKU编号
        /// </summary>
        [DisplayName("SKU")]
        [Description("SKU")]
        public string Id { get; set; }

        /// <summary>
        /// UPC编号
        /// </summary>
        [DisplayName("UPC")]
        [Description("UPC")]
        public string UPC { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        [DisplayName("商品名称")]
        [Description("商品名称")]
        public string Name { get; set; }

        /// <summary>
        /// 商品规格
        /// </summary>
        [DisplayName("商品规格")]
        [Description("商品规格")]
        public string? Specification { get; set; }

        /// <summary>
        /// 商品品牌
        /// </summary>
        [DisplayName("商品品牌")]
        [Description("商品品牌")]
        public string? Brand { get; set; }

        /// <summary>
        /// 商品部类
        /// </summary>
        [DisplayName("商品部类")]
        [Description("商品部类")]
        public string? Department { get; set; }

        /// <summary>
        /// 产地
        /// </summary>
        [DisplayName("产地")]
        [Description("产地")]
        public string? OriginPlace { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [DisplayName("创建时间")]
        [Description("创建时间")]
        public DateTime? CreatedOn { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        [DisplayName("创建者")]
        [Description("创建者")]
        public string CreatedBy { get; set; }

        /// <summary>
        /// 最近更新时间
        /// </summary>
        [DisplayName("最近更新时间")]
        [Description("最近更新时间")]
        public DateTime? LastModifiedOn { get; set; }

        /// <summary>
        /// 商品证照
        /// </summary>
        [DisplayName("商品证照")]
        [Description("商品证照")]
        [BizDataType("ListURL")]
        public List<string>? ProductLicenseUrl { get; set; }
    }

    [Obsolete]
    public enum ProductCategory
    {
        /// <summary>
        /// 护肤用品
        /// </summary>
        [Description("护肤用品")]
        SKINCARE = 1011
    }

    [Obsolete]
    public enum ProductDepartment
    {
        /// <summary>
        /// 美容护理
        /// </summary>
        [Description("美容护理")]
        BEAUTYCARE = 10,

        /// <summary>
        /// 个人护理
        /// </summary>
        [Description("个人护理")]
        PERSONALCARE = 20,

        /// <summary>
        /// 医疗保健
        /// </summary>
        [Description("医疗保健")]
        HEALTHCARE = 30,

        /// <summary>
        /// 食品和饮料
        /// </summary>
        [Description("食品和饮料")]
        FOODCONFECTIONARY = 40,

        /// <summary>
        /// 婴儿用品
        /// </summary>
        [Description("婴儿用品")]
        BABYCARE = 50,

        /// <summary>
        /// 百货商品
        /// </summary>
        [Description("百货商品")]
        GENERALMERCHANDISE = 60,

        /// <summary>
        /// 服务类用品
        /// </summary>
        [Description("服务类用品")]
        SERVICE = 70,

        /// <summary>
        /// 其他
        /// </summary>
        [Description("其他")]
        OTHERS = 80,
    }
}

